﻿using System;
using Csla;
using BizControl.Library.BusinessObjects.People;

namespace BizControl.Library.BusinessObjects.Messages
{
  [Serializable()]
  public class MessageInfo : ReadOnlyBase<MessageInfo>
  {
    public Guid Id { get; private set; }
    public string Subject { get; private set; }
    public PersonBO From { get; private set; }

    public override string ToString()
    {
      return Subject;
    }

    private MessageInfo()
    { /* require use of factory methods */ }

    internal MessageInfo(Guid id, string subject, PersonBO from)
    {
      Id = id;
      Subject = subject;
      From = from;
    }
  }
}
